import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: '首页',
  component: () => import('../componets/layout.vue'),
  children: [{
      path: '概览',
      name: '概览',
      component: () => import('../views/overgion')
    },
    {
      path: '监测预警',
      name: '监测预警',
      component: () => import('../views/report')
    },
    {
      path: '监测预警/详情',
      name: '监测预警/详情',
      component: () => import('../views/report/detail.vue')
    },
    {
      path: '实施评估',
      name: '实施评估',
      component: () => import('../views/assess')
    },
    {
      path: '专题评估',
      name: '专题评估',
      component: () => import('../views/assess/special.vue')
    },
    {
      path: '监控配置',
      name: '监控配置',
      component: () => import('../views/monitor')
    }, {
      path: '监控配置/新建指标任务',
      name: '监控配置/新建指标任务',
      component: () => import('../views/monitor/detail.vue')
    }, {
      path: '监控配置/指标配置',
      name: '监控配置/指标配置',
      component: () => import('../views/monitor/config.vue')
    }
  ]
}]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router